﻿<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="scope.files/filelist.xml">
<title>scope</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>MC SYSTEM</o:Author>
  <o:LastAuthor>MC SYSTEM</o:LastAuthor>
  <o:Revision>29</o:Revision>
  <o:TotalTime>138</o:TotalTime>
  <o:Created>2014-10-22T11:22:00Z</o:Created>
  <o:LastSaved>2014-10-22T13:40:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>254</o:Words>
  <o:Characters>1453</o:Characters>
  <o:Company>MC SYSTEM</o:Company>
  <o:Lines>12</o:Lines>
  <o:Paragraphs>3</o:Paragraphs>
  <o:CharactersWithSpaces>1704</o:CharactersWithSpaces>
  <o:Version>11.5606</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
	{font-family:"YaHei UI";
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-alt:"Times New Roman";
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:auto;
	mso-font-signature:0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
h4
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:4;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	font-weight:bold;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
code
	{mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:宋体;
	mso-ascii-font-family:宋体;
	mso-fareast-font-family:宋体;
	mso-hansi-font-family:宋体;
	mso-bidi-font-family:宋体;}
pre
	{margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
span.dcomment
	{mso-style-name:dcomment;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:516583537;
	mso-list-template-ids:-542189166;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level3
	{mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level4
	{mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level5
	{mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level6
	{mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level7
	{mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level8
	{mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level9
	{mso-level-tab-stop:324.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1
	{mso-list-id:575673144;
	mso-list-template-ids:1790720322;}
@list l1:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level2
	{mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level3
	{mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level4
	{mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level5
	{mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level6
	{mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level7
	{mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level8
	{mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level9
	{mso-level-tab-stop:324.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2
	{mso-list-id:826478168;
	mso-list-template-ids:-591076304;}
@list l2:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l2:level2
	{mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level3
	{mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level4
	{mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level5
	{mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level6
	{mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level7
	{mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level8
	{mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l2:level9
	{mso-level-tab-stop:324.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:普通表格;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=blue style='tab-interval:21.0pt'>

<div class=Section1>

<h4 style='margin-top:0cm;margin-right:6.0pt;margin-bottom:0cm;margin-left:
6.0pt;margin-bottom:.0001pt;vertical-align:baseline'><span class=GramE><code><span
lang=EN-US style='font-size:21.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span></code></span><span
lang=EN-US style='font-size:18.0pt;font-family:Arial;color:#000033'><o:p></o:p></span></h4>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;vertical-align:baseline;
outline: 0px;orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
background-position:initial initial;background-repeat:initial initial;
word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>众所周知，想让表达式总能被执行，那就写在</span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>finally</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>块里，想让表达式在错误条件下被触发，那就写在</span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>catch</span></b></code><code><b><span
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>块里。</span></b></code><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;vertical-align:baseline;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>这些块有以下特点：</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>没有一个</span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>try</span></b></code><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>块，</span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>catch</span></b></code><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>和</span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>finally</span></b></code><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>不能使用。</span><span lang=EN-US style='font-family:"Times New Roman";
color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:6.0pt;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>属于块的某些变量，块范围内有可能访问不到：</span><span lang=EN-US style='font-family:
"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:18.0pt;margin-right:24.0pt'><pre style='margin-left:18.0pt;
text-indent:-18.0pt;line-height:14.25pt;mso-list:l1 level1 lfo2;background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>void</span></span><span
lang=EN-US style='color:black'> <span class=SpellE>foo</span>(</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>ref</span></span><span
lang=EN-US style='color:black'> </span><span class=SpellE><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>int</span></span></span><span
lang=EN-US style='color:black'> r)<o:p></o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'>{<o:p></o:p></span></pre><pre style='margin-left:
18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:l1 level1 lfo2;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>try</span></span><span
lang=EN-US style='color:black'> {<o:p></o:p></span></pre><pre style='margin-left:
18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:l1 level1 lfo2;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=SpellE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>int</span></span></span><span
lang=EN-US style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm;background:#FFFF88'> addend</span></span><span
lang=EN-US style='color:black'> = 42;<o:p></o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>        </span>r += addend;<o:p></o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>        </span><span
class=SpellE>mayThrow</span>();<o:p></o:p></span></pre><pre style='margin-left:
18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:l1 level1 lfo2;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span>} </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>catch</span></span><span
lang=EN-US style='color:black'> (Exception <span class=SpellE>exc</span>) {<o:p></o:p></span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
class=dcomment><span lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>        </span>r -= addend;<span style='mso-spacerun:yes'>          </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=dcomment><span lang=EN-US style='font-size:10.0pt;color:green;border:
none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>// </span></span><span
class=dcomment><span style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>← <span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'></span></span><span
class=dcomment></span><span style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm;background:#FF4040'>编译错误</span><span
lang=EN-US><o:p></o:p></span></span></pre><pre style='margin-left:18.0pt;
text-indent:-18.0pt;line-height:14.25pt;mso-list:l1 level1 lfo2;background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span>}</span></pre><pre
style='margin-left:18.0pt;text-indent:-18.0pt;line-height:14.25pt;mso-list:
l1 level1 lfo2;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
lang=EN-US style='color:black'>}<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:24.0pt;margin-bottom:0cm;margin-left:
36.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span style='background:white'>上面这个函数</span><span
srcinfo="14:18" dstinfo="2:3" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__14_18TO2_3">首先</span><span srcinfo="20:27" dstinfo="4:5"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__20_27TO4_5">修改</span><span srcinfo="33:41"
dstinfo="6:7" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px' id="ouHighlight__33_41TO6_7">引用</span><span
srcinfo="43:51" dstinfo="8:9" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__43_51TO8_9">参数</span><span srcinfo="52:52" dstinfo="10:10"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__52_52TO10_10">，</span><span srcinfo="58:61"
dstinfo="12:13" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px' id="ouHighlight__58_61TO12_13">当出现异常时恢复</span><span
srcinfo="71:74" dstinfo="16:16" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__71_74TO16_16">这</span><span style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="noHighlight_0.02124245767481625">一</span><span srcinfo="76:87" dstinfo="18:19"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__76_87TO18_19">修改</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.08605637610889971">。不幸的</span><span srcinfo="110:130"
dstinfo="30:31" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__110_130TO30_31">是，</span><span srcinfo="132:137" dstinfo="32:34"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__132_137TO32_34">被加数</span><span srcinfo="142:151"
dstinfo="35:38" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__142_151TO35_38">只能在定义它的</span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>try</span></b></code><span style='background:
white'>块中被访问</span><span style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="noHighlight_0.6943279516417533">。</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.8145396870095283">（<b><i><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>注</span></i></b><b><i><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>:</span></i></b><span class=apple-converted-space><i><span
lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></i></span><i><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>这有关名字空间；以及对象生存期，这将在后面的章节中解释</span></i><i><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>)</span></i><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l0 level1 lfo4;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>潜在无关联的表达式全部写在底部唯一的</span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>finally</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>块里，就可以分离那些有关联的可执行代码。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;mso-line-height-alt:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><code><b><span lang=EN-US style='font-size:
14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>Scope</span></b></code><span class=apple-converted-space><span
style='font-family:宋体;mso-bidi-font-family:宋体;color:black'>语句与</span></span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>catch</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>和</span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>finally</span></b></code><span
lang=EN-US style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>有相似的功能，但在许多方面表现的更好。</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>下面</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'>3</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>个</span><span
class=apple-converted-space><span lang=EN-US style='color:black'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>语句就是关于离开作用域时应执行的表达式</span><span
style='font-size:10.5pt;mso-ascii-font-family:"YaHei UI";mso-hansi-font-family:
"YaHei UI";color:#444444;background:white'>：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l2 level1 lfo6;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>scope(exit)</span></b></code><span lang=EN-US
style='font-family:"Times New Roman";color:black'>:</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>表达式总是在退出作用域时被执行，</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>无论是否成功或出现异常。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l2 level1 lfo6;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>scope(success)</span></b></code><span
lang=EN-US style='font-family:"Times New Roman";color:black'>: </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>表达式只在成功退出作用域时被执行。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l2 level1 lfo6;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>scope(failure)</span></b></code><span
lang=EN-US style='font-family:"Times New Roman";color:black'>: </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>表达式只在作用域内出现异常时被执行。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>虽然这些语句只在特殊情况下使用，但是没有</span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>try-catch</span></b></code><span lang=EN-US
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>块也能使用。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>例如，我们用</span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>scope(failure)</span></b></code><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black'>语句写一下上面的函数：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>void</span></span></span><span
lang=EN-US style='color:black'> <span class=SpellE>foo</span>(</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>ref</span></span><span
lang=EN-US style='color:black'> </span><span class=SpellE><span lang=EN-US
style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'>int</span></span></span><span
lang=EN-US style='color:black'> r)<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'>{<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=SpellE><span class=GramE><span lang=EN-US style='font-size:10.0pt;
color:blue;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>int</span></span></span></span><span lang=EN-US style='color:black'> addend = 42;<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span>r += addend;<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm;background:#FFFF88'>(</span></span></span><span
lang=EN-US style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm;background:#FFFF88'>failure)</span></span><span
lang=EN-US style='color:black'> r -= addend;<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span><span
class=SpellE><span class=GramE>mayThrow</span></span><span class=GramE>(</span>);<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'>}<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;mso-line-height-alt:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><code><b><span lang=EN-US style='font-size:
14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>scope(failure)</span></b></code><span class=apple-converted-space><span
style='font-family:宋体;mso-bidi-font-family:宋体;color:black'>语句可以保证</span><span
lang=EN-US style='color:black'>&nbsp;</span></span><code style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>r -= <span class=SpellE>addend<span
style='font-size:12.0pt;font-family:"Times New Roman";color:black;font-weight:
normal'>expression</span></span></span></b></code><span lang=EN-US
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>在异常退出时被执行。</span><span
class=apple-converted-space><span lang=EN-US style='color:black'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope(failure)</span></b></code><span
class=apple-converted-space><span style='font-family:宋体;mso-bidi-font-family:
宋体;color:black'>的好处是靠近它的表达式可以还原已写好的另一个表达式。</span></span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;mso-line-height-alt:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>scope</span></b></code><span
class=apple-converted-space><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:
宋体;color:black'>&nbsp;</span></span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>语句也可以像块一样使用：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
class=GramE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:blue;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>scope</span></span><span lang=EN-US style='color:black'>(</span></span><span
lang=EN-US style='color:black'>exit) {<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// ... </span><span
class=GramE><span style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>表达式<span lang=EN-US> ...</span></span></span><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></pre></span><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span>}<o:p></o:p></span></pre></div>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>下面是另一个函数来测试这三个语句：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>void</span></span></span><span
lang=EN-US style='color:black'> test()<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'>{<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='color:black'>(</span></span></span><span lang=EN-US style='color:black'>exit) <span
class=SpellE>writeln</span>(</span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;when exiting 1&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='color:black'>(</span></span></span><span lang=EN-US style='color:black'>success) {<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE><span class=GramE>writeln</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;if successful 1&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE><span class=GramE>writeln</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;if successful 2&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>    </span>}<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='color:black'>(</span></span></span><span lang=EN-US style='color:black'>failure) <span
class=SpellE>writeln</span>(</span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;if thrown 1&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='color:black'>(</span></span></span><span lang=EN-US style='color:black'>exit) <span
class=SpellE>writeln</span>(</span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;when exiting 2&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope</span><span lang=EN-US
style='color:black'>(</span></span></span><span lang=EN-US style='color:black'>failure) <span
class=SpellE>writeln</span>(</span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;if thrown 2&quot;</span></span><span
lang=EN-US style='color:black'>);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>    </span><span
class=SpellE><span class=GramE>throwsHalfTheTime</span></span><span
class=GramE>(</span>);<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'>}<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>如果没有抛出异常，</span><span style='font-family:"Times New Roman";
color:black'> </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>函数的输出只包括</span><span style='font-family:"Times New Roman";
color:black'> </span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>scope(exit)</span></b></code><span class=apple-converted-space><span
lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体;color:black'> </span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>和</span><span
class=apple-converted-space><span lang=EN-US style='color:black'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>scope(success)</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>语句：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:#E0E0E0;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#E0E0E0;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
class=GramE><b><span lang=EN-US style='font-size:10.0pt;color:black'>when</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> exiting 2<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>if</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> successful 1<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>if</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> successful 2<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>when</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> exiting 1<o:p></o:p></span></b></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>如果抛出异常，</span><span style='font-family:"Times New Roman";
color:black'> </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>输出包括</span><span class=apple-converted-space><span lang=EN-US
style='color:black'>&nbsp;</span></span><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>scope(exit)</span></b></code><span
class=apple-converted-space><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:
宋体;color:black'> </span></span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>和</span><code><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>scope(failure)</span></b></code><span class=apple-converted-space><span
lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体;color:black'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>语句：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:#E0E0E0;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#E0E0E0;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
class=GramE><b><span lang=EN-US style='font-size:10.0pt;color:black'>if</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> thrown 2<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>when</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> exiting 2<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>if</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> thrown 1<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>when</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'> exiting 1<o:p></o:p></span></b></pre><pre
style='margin-top:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;
background:#E0E0E0;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=SpellE><b><span
lang=EN-US style='font-size:10.0pt;color:black'>object.Exception</span></b></span><b><span
lang=EN-US style='font-size:10.0pt;color:black'>@...: the error message<o:p></o:p></span></b></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:10.5pt;mso-ascii-font-family:
"YaHei UI";mso-hansi-font-family:"YaHei UI";color:#444444;background:white'>在输出</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.026222752407193184">中我们看到，</span></span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span srcinfo="72:73" dstinfo="6:6"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__72_73TO6_6">scope</span></b></code><span
class=apple-converted-space><span lang=EN-US style='font-size:10.5pt;
font-family:"YaHei UI";mso-bidi-font-family:宋体;color:#444444;background:white'>&nbsp;</span></span></span><span
style='font-size:10.5pt;mso-ascii-font-family:"YaHei UI";mso-hansi-font-family:
"YaHei UI";color:#444444;background:white'><span srcinfo="48:57" dstinfo="22:23"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__48_57TO22_23">语句</span><span srcinfo="28:33"
dstinfo="24:24" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px' id="ouHighlight__28_33TO24_24">块</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.15301663684658706">是按</span><span srcinfo="75:81" dstinfo="7:8"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__75_81TO7_8">相反</span><span style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="noHighlight_0.35743206716142595">的</span><span srcinfo="83:87" dstinfo="10:11"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__83_87TO10_11">顺序</span><span srcinfo="63:70"
dstinfo="12:13" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px' id="ouHighlight__63_70TO12_13">执行</span><span
class=apple-converted-space><span style='font-family:宋体;mso-ascii-font-family:
"YaHei UI";mso-hansi-font-family:"YaHei UI";mso-bidi-font-family:宋体'><span
srcinfo="35:36" dstinfo="14:14" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__35_36TO14_14">的</span></span>。</span><span srcinfo="90:93"
dstinfo="26:26" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px' id="ouHighlight__90_93TO26_26">这</span><span
srcinfo="95:96" dstinfo="27:27" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__95_96TO27_27">是</span><span srcinfo="98:104" dstinfo="28:29"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__98_104TO28_29">因为</span><span srcinfo="106:110"
dstinfo="30:30" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__106_110TO30_30">后</span><span style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="noHighlight_0.8599249224644154">边的代码</span><span srcinfo="117:119" dstinfo="35:36"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__117_119TO35_36">依赖于前边的</span><span srcinfo="140:148"
dstinfo="43:44" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__140_148TO43_44">变量</span><span style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="noHighlight_0.29452989087440073">。</span><span srcinfo="182:183" dstinfo="46:46"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__182_183TO46_46">这样执行</span></span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="noHighlight_0.9546472497750074">scope</span></b></code><span
class=apple-converted-space><span lang=EN-US style='font-size:10.5pt;
font-family:"YaHei UI";mso-bidi-font-family:宋体;color:#444444;background:white'>&nbsp;</span></span></span><span
style='font-size:10.5pt;mso-ascii-font-family:"YaHei UI";mso-hansi-font-family:
"YaHei UI";color:#444444;background:white'><span srcinfo="171:180" dstinfo="61:62"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__171_180TO61_62">语句</span><span srcinfo="199:205"
dstinfo="63:64" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__199_205TO63_64">让程序能按</span><span srcinfo="256:265" dstinfo="79:80"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__256_265TO79_80">一致</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.1393062772694975">的</span><span srcinfo="267:271" dstinfo="82:83"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__267_271TO82_83">顺序</span><span
style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px' id="noHighlight_0.6142808701843023">撤消</span><span srcinfo="215:226"
dstinfo="67:69" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__215_226TO67_69">前边表达式</span><span srcinfo="251:252" dstinfo="78:78"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__251_252TO78_78">的副作用</span><span srcinfo="228:229"
dstinfo="70:70" paragraphname=paragraph0 style='orphans: auto;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__228_229TO70_70">。</span></span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p class=MsoNormal align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline'><span lang=EN-US style='font-size:11.0pt;font-family:
"Times New Roman";color:black'>[<span class=apple-converted-space>&nbsp;</span><a
href="exceptions.html" style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.5pt;
font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman";color:purple;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm;text-decoration:none;text-underline:none'><span
lang=EN-US>前<span lang=EN-US>一<span lang=EN-US>节</span></span></span></span><span
style='font-size:10.5pt;color:purple;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm;text-decoration:none;text-underline:none'>&nbsp;</span></a>]
&nbsp; [<span class=apple-converted-space>&nbsp;</span><a href="assert.html"
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.5pt;font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:purple;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm;text-decoration:none;text-underline:
none'><span lang=EN-US>后<span lang=EN-US>一<span lang=EN-US>节</span></span></span></span><span
style='font-size:10.5pt;color:purple;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm;text-decoration:none;text-underline:none'>&nbsp;</span></a>]<o:p></o:p></span></p>

</span></span></div>

</body>

</html>
